@extends('admin.layout')
@section('content')
@section('title',$title)
 <div class="content-wrapper">
        <!-- Content Header (Page header) -->
        <section class="content-header">
            <h1>
               用户管理
                <small>添加用户</small>
            </h1>
            <ol class="breadcrumb">
                <li><a href="#"><i class="fa fa-dashboard"></i>主页</a></li>
                <li><a href="#">用户管理</a></li>
                <li class="active">添加用户</li>
            </ol>
        </section>

        <!-- Main content -->
        <section class="content">
            <div class="row">
                <!-- left column -->
                <div class="col-md-12">
                    <!-- general form elements -->
                    <div class="box box-primary">
                        <div class="box-header with-border">
                            <h3 class="box-title">快速添加</h3>
                        </div><!-- /.box-header -->
                        <!-- form start -->
                        <form role="form" action="{{ url('/admin/user/insert')}}" method="post" enctype ="multipart/form-data">
                            <div class="box-body">
                            @if (count($errors) > 0)
                            <div id="jg" class="alert alert-info alert-dismissable">
                                <button type="button" class="close" data-dismiss="alert" aria-hidden="true">&times;</button>
                                <ul>
                                        @foreach ($errors->all() as $error)
                                            <p>{{ $error }}</p>
                                        @endforeach
                                    </ul>
                              </div>


                            @endif
                            {{ csrf_field()}}
                                 <div class="form-group">
                                    <label for="exampleInputEmail1">用户邮箱</label>
                                    <input name="email" type="email" class="form-control" id="exampleInputEmail1"
                                           placeholder="请输入用户邮箱">
                                </div>
                                <div class="form-group">
                                    <label for="exampleInputPassword1">密码</label>
                                    <input name="password" type="password" class="form-control" id="exampleInputPassword1"
                                           placeholder="请输入密码">
                                </div>
                                <div class="form-group">
                                    <label for="exampleInputPassword1">确认密码</label>
                                    <input name="repassword"type="password" class="form-control" id="exampleInputPassword1"
                                           placeholder="请再次输入密码">
                               <div class="form-group">

                                    <label for="exampleInputFile">头像</label>
                                    <input name="pic" type="file" id="exampleInputFile">
                                    <p class="help-block">请选择你觉得合适的头像</p>
                                </div>
                            </div><!-- /.box-body -->

                            <div class="box-footer">
                                <button type="submit" class="btn btn-primary">添加</button>
                                 <button type="reset" class="btn btn-primary">重置</button>
                            </div>
                        </form>
                    </div>
                            </div><!-- /input-group -->
                        </div><!-- /.box-body -->
                    </div><!-- /.box -->

                </div><!--/.col (left) -->
                <!-- right column -->

                </div><!--/.col (right) -->
            </div>   <!-- /.row -->
        </section><!-- /.content -->
    </div>
    <script type="text/javascript">
       window.onload = function()
       {
         setInterval(function(){
               $("#jg").slideUp();
         },3000)
       }
    </script>
@endsection